<template>
    <view class="more-info">
        <u-cell-group :border="false">
            <u-cell :isLink="true" :border="true" :clickable="false" @click="clickFollow()">
                <view slot="title" class="u-slot-title" >
                    <text class="u-cell-text">跟进记录</text>
                </view>
                <text slot="value" class="u-slot-value">{{ infoData.followUpRecordNumber }}</text>
            </u-cell>
            <u-cell :isLink="true" :border="true" :clickable="false" @click="clickCstOrderList()">
                <view slot="title" class="u-slot-title" >
                    <text class="u-cell-text">订单记录</text>
                </view>
                <text slot="value" class="u-slot-value">{{ infoData.orderRecordNumber }}</text>
            </u-cell>
            <u-cell :isLink="true" :border="true" :clickable="false" @click="goCstRefundList()">
                <view slot="title" class="u-slot-title" >
                    <text class="u-cell-text">退款记录</text>
                </view>
                <text slot="value" class="u-slot-value">{{ infoData.refundNumber }}</text>
            </u-cell>
            <u-cell :isLink="true" :border="true" :clickable="false" @click="goBlongList()">
                <view slot="title" class="u-slot-title" >
                    <text class="u-cell-text">归属记录</text>
                </view>
                <text slot="value" class="u-slot-value">{{ infoData.belongToNumber }}</text>
            </u-cell>
            <u-cell :isLink="true" :border="true" :clickable="false" @click="goOperateList()">
                <view slot="title" class="u-slot-title" >
                    <text class="u-cell-text">操作日志</text>
                </view>
                <text slot="value" class="u-slot-value">{{ infoData.opeLogNumber }}</text>
            </u-cell>
        </u-cell-group>
    </view>
</template>

<script>
export default {
    props: {
        id: {
            type: String
        }
    },
    data() {
        return {
            infoData: {}
        }
    },
    created() {
        // this.queryData.id = this.id
        this.getData()
    },
    methods: {
        getData() {
            this.$http.get('/app/customer/detailsMore/' + this.id, {}).then(res => {
				if (res.code == 200) {
                    this.infoData = res.data
				} else {
					uni.$u.toast(res.msg)
				}
			}).catch(err => {
                console.log(err)
			})
        },
        clickFollow() {
            uni.navigateTo({
                url: '/pages/other/followRecords?customerId=' + this.id
            })
        },
        clickCstOrderList() {
            uni.navigateTo({
                url: '/pages/other/cstOrderList?customerId=' + this.id
            })
        },
        // 退款记录
        goCstRefundList() {
            uni.navigateTo({
                url: '/pages/other/cstRefundList?customerId=' + this.id
            })
        },
        // 归属记录
        goBlongList() {
            uni.navigateTo({
                url: '/pages/other/belongList?customerId=' + this.id
            })
        },
        // 归属记录
        goOperateList() {
            uni.navigateTo({
                url: '/pages/other/operateList?customerId=' + this.id
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.more-info {
    background: rgb(255, 255, 255);
    padding: 0 32rpx;
    /deep/.u-cell__body {
        padding-left: 0;
        padding-right: 0;
    }
}
</style>